/*
 * @Author: hcsy 
 * @Date: 2018-08-31 16:42:44 
 * @Last Modified by: hcsy
 * @Last Modified time: 2018-09-04 11:15:15
 */
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import 'element-ui/lib/theme-chalk/index.css';
//路由
import router from './router';
//状态管理
import store from './vuex/index';
/**
 * 首页基础信息定义给store赋值
 */
store.state.config = AppConfig;
//过滤和自定义组件
import './assets/js/filter.js';
//请求
import hpost from './api/http';
Vue.prototype.$ = hpost;
//es6基础
import basic from './assets/js/basic';
Vue.prototype.$basic = basic;
//自定义指令集
import hdirective from './assets/js/hdirective.js';
Vue.use(hdirective);

//组件
// import ElementUI from 'element-ui';
// Vue.use(ElementUI, { size: 'small' });
import './assets/js/elementUi.js';
import 'element-ui/lib/theme-chalk/index.css';

Vue.config.productionTip = false

/* eslint-disable no-new */
window.hvue = new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>',
  /* 这句非常重要，否则预渲染将不会启动 */
  mounted() {
    document.dispatchEvent(new Event('render-event'))
  }

})
